#include "Precomp.h"
#include "AllBindings.h"
#include "Renderer.h"
#include "SQGame.h"

DECLARE_INSTANCE_TYPE_NAME_CONST(sf::View,Camera);
DECLARE_INSTANCE_TYPE_NAME_CONST(sf::Vector2f,Vector2f);

void bindSFML()
{
	SQClassDef<sf::Vector2f>(L"Vector2f")
		.var(&sf::Vector2f::x,L"x")
		.var(&sf::Vector2f::y,L"y");
	
	Renderer& renderer=SQGame::getInstance().getRenderer();
	SQClassDef<sf::View>(L"Camera")
		.overloadFunc<void(sf::View::*)(const sf::Vector2f&)>(&sf::View::SetCenter,L"setPosition");
	
	RegisterGlobal(renderer,&Renderer::getCurrentView,L"getActiveCamera");
	RegisterGlobal(renderer,&Renderer::setView,L"setActiveCamera");
}